<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AWTK-CPP: TCandidates类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">AWTK-CPP
   </div>
   <div id="projectbrief">AWTK CPP API</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="class_t_candidates-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">TCandidates类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="awtk__cpp_8hpp_source.html">awtk_cpp.hpp</a>&gt;</code></p>
<div class="dynheader">
类 TCandidates 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_t_candidates.png" alt=""/>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a10001845b27fac01aafba77533c51ace"><td class="memItemLeft" align="right" valign="top"><a id="a10001845b27fac01aafba77533c51ace"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>TCandidates</b> (widget_t *nativeObj)</td></tr>
<tr class="separator:a10001845b27fac01aafba77533c51ace"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa43cf24b6e6ba7b9b7dddddf0034b8fc"><td class="memItemLeft" align="right" valign="top"><a id="aa43cf24b6e6ba7b9b7dddddf0034b8fc"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>TCandidates</b> (const candidates_t *nativeObj)</td></tr>
<tr class="separator:aa43cf24b6e6ba7b9b7dddddf0034b8fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:a226c09d428594a0db130f87af1e5bff5"><td class="memItemLeft" align="right" valign="top"><a id="a226c09d428594a0db130f87af1e5bff5"></a>
static <a class="el" href="class_t_candidates.html">TCandidates</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Cast</b> (widget_t *nativeObj)</td></tr>
<tr class="separator:a226c09d428594a0db130f87af1e5bff5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a198a149e8d612468c34267c28e85a1b6"><td class="memItemLeft" align="right" valign="top"><a id="a198a149e8d612468c34267c28e85a1b6"></a>
static <a class="el" href="class_t_candidates.html">TCandidates</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Cast</b> (const widget_t *nativeObj)</td></tr>
<tr class="separator:a198a149e8d612468c34267c28e85a1b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5cc09988410e73c580583afe0e5bf0e5"><td class="memItemLeft" align="right" valign="top"><a id="a5cc09988410e73c580583afe0e5bf0e5"></a>
static <a class="el" href="class_t_candidates.html">TCandidates</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Cast</b> (TWidget &amp;obj)</td></tr>
<tr class="separator:a5cc09988410e73c580583afe0e5bf0e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7786ada3baff3c0a808d74044a049644"><td class="memItemLeft" align="right" valign="top"><a id="a7786ada3baff3c0a808d74044a049644"></a>
static <a class="el" href="class_t_candidates.html">TCandidates</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Cast</b> (const TWidget &amp;obj)</td></tr>
<tr class="separator:a7786ada3baff3c0a808d74044a049644"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>输入法候选字词控件。</p>
<p>如果希望启用用数字选择对应的候选字，请设置属性grab_keys="true"。如：</p>
<div class="fragment"><div class="line">*&lt;<span class="keywordtype">candidates</span> <span class="keyword">x</span>=<span class="stringliteral">&quot;0&quot;</span> <span class="keyword">y</span>=<span class="stringliteral">&quot;0&quot;</span> <span class="keyword">w</span>=<span class="stringliteral">&quot;100%&quot;</span> <span class="keyword">h</span>=<span class="stringliteral">&quot;30&quot;</span> <span class="keyword">grab_keys</span>=<span class="stringliteral">&quot;true&quot;</span>/&gt;</div>
</div><!-- fragment --><p>&gt;相关文件： assets/default/raw/ui/kb_default.xml</p>
<p>如果希望通过左右键切换不同的候选字，除了设置属性grab_keys="true"，还需要设置按钮的focused状态的style。</p>
<div class="fragment"><div class="line">*&lt;<span class="keywordtype">style</span> <span class="keyword">name</span>=<span class="stringliteral">&quot;candidates&quot;</span> <span class="keyword">text_color</span>=<span class="stringliteral">&quot;black&quot;</span>&gt;</div>
<div class="line">*&lt;<span class="keywordtype">normal</span>  /&gt;</div>
<div class="line">*&lt;<span class="keywordtype">pressed</span>    <span class="keyword">bg_color</span>=<span class="stringliteral">&quot;#c0c0c0&quot;</span> <span class="keyword">border_color</span>=<span class="stringliteral">&quot;#a0a0a0&quot;</span>/&gt;</div>
<div class="line">*&lt;<span class="keywordtype">over</span>       <span class="keyword">bg_color</span>=<span class="stringliteral">&quot;#e0e0e0&quot;</span> <span class="keyword">border_color</span>=<span class="stringliteral">&quot;#a0a0a0&quot;</span>/&gt;</div>
<div class="line">*&lt;<span class="keywordtype">focused</span>    <span class="keyword">border_color</span>=<span class="stringliteral">&quot;#a0a0a0&quot;</span>/&gt;</div>
<div class="line">*&lt;/<span class="keywordtype">style</span>&gt;</div>
</div><!-- fragment --><p>&gt;相关文件：assets/default/raw/styles/keyboard.xml </p>
</div><hr/>该类的文档由以下文件生成:<ul>
<li>output/<a class="el" href="awtk__cpp_8hpp_source.html">awtk_cpp.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
